// JavaScript Document
document.onreadystatechange = subSomething;
	function subSomething(){ 
		if(document.readyState == "complete"||document.readyState == "interactive")
		{
			$("#text").val("");
			$(".tab_checkbox,.tab_checkbox1").attr("checked",false);
			if(document.activeElement.id=="text"){$(".table_ts").hide();}
		}
	}
$(document).ready(function(e) {
    $(".table_text").focus(function(){
			$(".table_ts").hide();
		});
	$(".table_text").blur(function(){
		if($(this).val()==null||$(this).val()=="")
			$(".table_ts").show();
		});
	$(".table_ts").click(function(){
		$(".table_text").focus();
		});
	$(".tab_checkbox1").click(function(){
		if($(this).attr("checked")=="checked"){
			 $(".tab_checkbox").attr("checked",true);
			}else{
			 $(".tab_checkbox").attr("checked",false);		
			};
		});	
	$("#delete").click(function(){
		  $(".tab_checkbox:checked").parents("tr").remove();
		  $(".tab_checkbox1").attr("checked",false);	
		});
	$(".table_bt1,.table_bt").hover(function(){
			$(".table_bt1").css("background","url(/static/skin/images/table_hoverbtbg_03.png) no-repeat");
			$(".table_bt2").css("background","url(/static/skin/images/table_hoverbtbg_07.png) no-repeat");
			$(".table_bt").css("background","url(/static/skin/images/table_hoverbtbg_05.png) repeat-x");
		},function(){
			$(".table_bt1").css("background","url(/static/skin/images/table_btbg_03.png) no-repeat");
			$(".table_bt2").css("background","url(/static/skin/images/table_btbg_05.png) no-repeat")
			$(".table_bt").css("background","url(/static/skin/images/table_btbg01_03.png) repeat-x");
		});
	$(".tab_button").hover(function(){
			$(this).css("background","#5AACDD");
		},function(){
			$(this).css("background","#4394CA");
		});
	$(".remove").live("click",function(){
			$(this).parents("tr").remove();
		});
	$("tr").hover(function(){
			$(this).children("td").addClass("table_tr");
		},function(){
			$(this).children("td").removeClass("table_tr");
		});
	$(".table_button").hover(function(){
			$(this).css("color","#000");
		},function(){
			$(this).css("color","#A6A6A6");
		});
});